﻿using Domain.Entity.ord;
using Domain.Entity;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Domain.IRepository
{
    public interface ISaleReturn_hRepository
    {
        //分页查询销售退货单
        Task<FenYe<SaleReturn_h>> GetSaleReturn_h(FenYe<SaleReturn_h> fenYe, string? code, int? status, int? cust, string? starttime, string? endtime);

        //高级查询
        Task<FenYe<SaleReturn_h>> GetAdvancedSaleReturn_h(FenYe<SaleReturn_h> fenYe, string? code, string? starttotal, string? endtotal, string? startdate, string? enddate, string? startnum, string? endnum, int? status, int? cust, string? custlink, string? salecode, int? dep, int? user, string? createname, string? startcreatetime, string? endcreatetime, string? approvername, string? startapprovertime, string? endapprovertime);

        //添加
        Task<int> AddSaleReturn_h(SaleReturn_h saleReturn_H);

        //修改
        Task<int> UpdateSaleReturn_h(SaleReturn_h saleReturn_H);

        //删除
        Task<int> DeleteSaleReturn_h(int id);

        //根据id查询信息
        Task<SaleReturn_h> GetSaleReturn_hById(int saletid);

        //审核
        Task<int> ApproverSaleReturn_h(int saletid, int status, string approvername, string approvertime);

        //撤销
        Task<int> UpdateStatus(int saletid, int status);

        //查询所有单据
        Task<List<SaleReturn_h>> GetAllSaleReturn_h();

        //根据编号查询信息
        Task<SaleReturn_h> GetSaleReturn_hByCode(string code);

        //更新入库数量及状态
        Task<int> UpdateNum(int saletid, int oknum, int nonum, int statu);


        //根据关联单号查询退货记录
        Task<List<SaleReturn_h>> GetSaleReturn_hs(string salecode);
    }
}
